﻿using System.Collections.Generic;
using System.Web.Http;
using FazaDemo.BL.Services_;
using FazaDemo.BL.SubDomains;

namespace FazaDemo.PL.WebSite.Mvc.Controllers.Api
{
    public class RootController : ApiController
    {

        private readonly IRootInfoProvider _provider;

        public RootController()
        {
            _provider = new RootInfoProvider();
        }

        // GET: api/RootInfo
        [HttpGet]
        public IEnumerable<RootInfo> Info(string login, string role)
        {
            var account = new Account {Login = login, Role = role};
            return _provider.GenerateRootInfo(account);
        }

    }
}
